module.exports = function(window, document) {
	var apivm = require('../../common/avm.min')(window, document);
	var avm = apivm;
	var api = apivm.api;
	var Component = apivm.Component;
	var $ = apivm.$;
	(function() {
	var StatusBarView = /*@__PURE__*/ (function(Component) {
		function StatusBarView(props) {
			Component.call(this, props);
			this.compute = {
				statusBarHeight: function() {
					if (api.safeArea) {
						return api.safeArea.top;
					} else {
						var res = wx.getSystemInfoSync();
						return res.statusBarHeight;
					}
				}
			};
		}

		if (Component) StatusBarView.__proto__ = Component;
		StatusBarView.prototype = Object.create(Component && Component.prototype);
		StatusBarView.prototype.constructor = StatusBarView;
		StatusBarView.prototype.render = function() {
			return apivm.h("view", {style: "height:" + this.statusBarHeight + "px;"});
		};

		return StatusBarView;
	})(Component);
	apivm.define("status-bar-view", StatusBarView);

	var Navigationbar = /*@__PURE__*/ (function(Component) {
		function Navigationbar(props) {
			Component.call(this, props);
		}

		if (Component) Navigationbar.__proto__ = Component;
		Navigationbar.prototype = Object.create(Component && Component.prototype);
		Navigationbar.prototype.constructor = Navigationbar;
		Navigationbar.prototype.onLeftButton = function(e) {
			api.closeWin();
		};
		Navigationbar.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "nav-container"},
				apivm.h("status-bar-view", null),
				apivm.h(
					"view",
					{class: "nav-header"},
					apivm.h(
						"view",
						{
							class: "nav-header-button nav-left-button",
							onclick: this.props.onLeftButton
								? this.props.onLeftButton
								: this.onLeftButton
						},
						apivm.h("image", {
							width: this.props.leftButtonWidth ? this.props.leftButtonWidth : 11,
							src: this.props.leftButtonIcon
								? this.props.leftButtonIcon
								: "../../image/back.png",
							mode: "widthFix"
						}),
						apivm.h("text", {class: "nav-header-text"}, this.props.leftButtonText)
					),
					apivm.h("text", {class: "nav-header-title"}, this.props.title),
					apivm.h(
						"view",
						{
							class: "nav-header-button nav-right-button",
							onclick: this.props.onRightButton
						},
						apivm.h("image", {
							width: this.props.rightButtonWidth ? this.props.rightButtonWidth : 0,
							src: this.props.rightButtonIcon ? this.props.rightButtonIcon : "",
							mode: "widthFix"
						}),
						apivm.h("text", {class: "nav-header-text"}, this.props.rightButtonText)
					)
				)
			);
		};

		return Navigationbar;
	})(Component);
	apivm.define("navigationBar", Navigationbar);

	var Message = /*@__PURE__*/ (function(Component) {
		function Message(props) {
			Component.call(this, props);
			this.data = {
				dataList: []
			};
		}

		if (Component) Message.__proto__ = Component;
		Message.prototype = Object.create(Component && Component.prototype);
		Message.prototype.constructor = Message;
		Message.prototype.apiready = function() {
			var dataList = [
				{
					time: "2020-05-26 11:30:33",
					type: "优惠提醒",
					content: "【生鲜电商】尊敬的客户，您领到一张新的优惠卷。快去看看吧~！"
				},
				{
					time: "2020-05-25 11:30:33",
					type: "优惠提醒",
					content: "【生鲜电商】尊敬的客户，您领到一张新的优惠卷。快去看看吧~！"
				}
			];

			this.data.dataList = dataList;
		};
		Message.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "main"},
				apivm.h("navigationBar", {title: "消息"}),
				apivm.h(
					"scroll-view",
					{class: "listView", "scroll-y": "true"},
					Object.entries(this.data.dataList).map(function(ref) {
						var index$1 = ref[0];
						var item$1 = ref[1];
						return apivm.h(
							"view",
							{class: "cell"},
							apivm.h(
								"view",
								{class: "container"},
								apivm.h(
									"view",
									{class: "top"},
									apivm.h("image", {
										class: "icon",
										src: "../../image/icon_user_coupon.png"
									}),
									apivm.h("text", {class: "type"}, item$1.type)
								),
								apivm.h("text", {class: "content"}, item$1.content),
								apivm.h("text", {class: "time"}, item$1.time)
							)
						);
					})
				)
			);
		};

		return Message;
	})(Component);
	apivm.define("message", Message);
	apivm.render(apivm.h("message", null), "body");
})();

	window['createApp'] = function() {
		apivm.$_start();
	}
	return avm;
}